/**
 * 
 */
package ultility;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author NhatHung
 *
 */
public class ConnectDatabase {
	
	public static Connection makeConnect() {
		 try {
	            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
	            try {
	              Connection  con = DriverManager.getConnection(ReadDataConnect.getConnectionURL());
	                return con;
	            } catch (SQLException e) {
	            	e.printStackTrace();
	            }
	        } catch (ClassNotFoundException e) {
	        	e.printStackTrace();
	        }
			return null;
		}

	//check connection string
	/**
	 * @param args
	 */
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.println(ReadDataConnect.getConnectionURL());
	}

}
